home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / alangsbs.zip / WORD2STR.SRC < prev   
Text File  |  1989-12-12  |  898b  |  23 lines

  1. ;---------------------------------------------------------------
  2. ;   Word2Str  --  Converts a word passed in AX to a string at
  3. ;                 DS:SI
  4. ;   Last update 3/8/89
  5. ;
  6. ;   1 entry point:
  7. ;
  8. ;   Word2Str:
  9. ;      Caller must pass:
  10. ;      AX : Word to be converted
  11. ;      DS : Segment of destination string
  12. ;      SI : Offset of destination string
  13. ;---------------------------------------------------------------
  14.  
  15. Word2Str   PROC
  16.            mov  CX,AX       ; Save a copy of convertee in CX
  17.            xchg AH,AL       ; Swap high and low AX bytes to do high first
  18.            call Byte2Str    ; Convert AL to string at DS:SI
  19.            add  SI,2        ; Bump SI to point to second 2 characters
  20.            mov  AX,CX       ; Reload convertee into AX
  21.            call Byte2Str    ; Convert AL to string at DS:SI
  22.            ret              ; And we're done!
  23. Word2Str   ENDP